package org.stream.answerduel.service;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.stream.answerduel.util.HttpRequestUtil;

/**
 * @author  郭榕
 * @date 2019/7/23 12:14
 * 功能描述:调用微信外部接口业务
 *
 */
@Service
public class WechatService {

    @Value("${wx.mp.appId}")
    private String appid="";

    @Value("${wx.mp.appSecret}")
    private String secret="";

    private String url ="https://api.weixin.qq.com/sns/jscode2session?" +
            "appid=wx08c3d67308581385"+
            "&secret=d59af2b0d8d4c09ed7ed2685e21b16fd"+
            "&grant_type=authorization_code"+
            "&js_code=";


    public String getSessionKeyAndOppenId(String code){

        return HttpRequestUtil.sendGetRequestToBank(url+code);

    }
}
